
import iconList from '@/const/iconList'

export const option = {
  height: 'auto',
  calcHeight: 80,
  searchShow: true,
  searchMenuSpan: 6,
  tip: false,
  tree: true,
  border: true,
  menuWidth: 300,
  align: 'center',
  column: [
    {
      label: "菜单名称",
      prop: "name",
      rules: [
        {
          required: true,
          message: "请输入菜单名称",
          trigger: "blur"
        }
      ]
    },
    {
      label: "上级菜单",
      prop: "parentId",
      type: "tree",
      dicData: [],
      hide: true,
      props: {
        label: "name",
        value: "id"
      },
      rules: [
        {
          required: false,
          message: "请选择上级菜单",
          trigger: "click"
        }
      ]
    },
    {
      label: "路由地址",
      prop: "path"
    },
    {
      label: "菜单图标",
      prop: "icon",
      type: "icon-select",
      slot: true,
      iconList: iconList
    },
    {
      label: "权限标识",
      prop: "permission"
    },
    {
      label: "菜单类型",
      prop: "type",
      type: "radio",
      dicUrl: '/admin/dict/type/menu_type',
      rules: [
        {
          required: true,
          message: "请选择菜单类型",
          trigger: "blur"
        }
      ]
    },

    {
      label: "菜单排序",
      prop: "sort",
      type: "number",
      rules: [
        {
          required: true,
          message: "请输入菜单排序",
          trigger: "blur"
        }
      ]
    }
  ]
}
